#include "../include/threadPool.h"

int sendCmd_p(int sockfd,char* buf,int flag,int *pathid){
    train_t train;
    bzero(&train,sizeof(train));
    train.length  = strlen(buf);
    memcpy(&train.flag,&flag,sizeof(flag));
    memcpy(train.data,buf,strlen(buf));
    send(sockfd,&train,sizeof(train.length)+train.length+sizeof(train.flag),0);
    printf("%s\n",train.data);
    send(sockfd,pathid,4,0);
    return 0;
}
